<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <!-- <script>
            function findStr(str1, str2) {
                let a = str2.indexOf(str1);
                console.log(a);
            }
            findStr("p", "hello");
        </script> -->
        <!-- <script>
            function slice(start, end, str) {
                let b = str.slice(start, end);
                console.log(b);
            }
            slice(1,3,"hello")
        </script> -->
        <!-- <script>
            function split(str1, str2) {
                let c = str1.split(str2);
                console.log(c);
            }
            split("2008-09-10", "-");
        </script> -->
        <script>
            // function reverse(str) {
            //     let newStr = "";
            //     for (let i =str.length - 1; i >= 0; i--) {
            //         newStr += str[i];
            //     }
            //     console.log(newStr);
            //     console.log(typeof newStr)
            // }
            // reverse("123");
            function reverse(str){
                str = str.split("")
                str.reverse()
                str = str.join("")
                console.log(str);
            }
            reverse("123");
        </script>
    </body>
</html>
